package com.itheima.dao;

import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface UserMapper extends Mapper<User> {
    @Update("update t_user set status=0 where uid=#{uid}")
    int deleteUser(String uid);

    @Update("update t_user set pass_word=#{password} where uid=#{uid}")
    int resetUserPassword(String uid, String password);

    @Select("select * from t_user limit #{start},#{end}")
    List<User> findAllUser(long start, long end);

    @Update("update t_user set comment_status= 0 where uid=#{userUid}")
    int closeComment(String userUid);
}
